#pragma once

using namespace Microsoft::WRL;
using namespace Windows::Foundation::Collections;
using namespace Platform::Collections;

class Direct2DManager
{
	// Instance
	static Direct2DManager*				m_instance;

	// D2D members
	ComPtr<ID2D1Factory1>				m_d2dFactory;
	ComPtr<IWICImagingFactory2>			m_wicFactory;
	ComPtr<IDXGIDevice>					m_dxgiDevice;
	ComPtr<ID2D1Device>					m_d2dDevice;
	ComPtr<ID2D1DeviceContext>			m_d2dContext;

	// Private constructor
	Direct2DManager(void);

public:

	// Instance
	static Direct2DManager* GetInstance();

	// Properties
	inline ComPtr<IWICImagingFactory2> GetWICFactory()
	{
		return m_wicFactory;
	}

	inline ComPtr<ID2D1Device> GetD2DDevice()
	{
		return m_d2dDevice;
	}

	inline ComPtr<ID2D1DeviceContext> GetD2DContext()
	{
		return m_d2dContext;
	}

	inline ComPtr<IDXGIDevice> GetDXGIDevice()
	{
		return m_dxgiDevice;
	}
};

